package team.you.change.dao;

import java.util.List;

import org.apache.ibatis.annotations.Param;
import team.you.change.pojo.Course;
import team.you.change.pojo.Room;
import team.you.change.pojo.User;

public interface RoomMapper {
    int deleteByPrimaryKey(String id);

    int insert(Room record);

    Room selectByPrimaryKey(String id);
    //查询所有教室信息
    List<Room> selectAll(@Param("page") Integer page, @Param("limit") Integer limit);

    int updateByPrimaryKey(Room record);

    Integer getCount();
    //模糊查询（名称或类型）
    List<Room> selectByLike(@Param("value") String value, @Param("type") Integer type, @Param("time") Integer time,
                            @Param("state") Integer state, @Param("page") Integer page, @Param("limit") Integer limit);
    //查询code是否存在
    Room selectCode(String code);
    //生成课表 查询所有教室id
    List<String> selectListId();
    //更新教室状态码
    Integer updateStateById(@Param("id") String id, @Param("value") Integer value, @Param("field") String field);
    //查询所有正常教室
    List<Room> selectAllId(@Param("num") Integer num);
}